﻿/** This file is part of the Mingw32 package.
*  unistd.h maps     (roughly) to io.h
*/
#ifndef _UNISTD_H
#define _UNISTD_H
#include <io.h>
#include <process.h>

#ifndef SHUT_WR
#define SHUT_WR 1
#endif

#ifdef WIN32
#define write(fd,buf,len) send((fd),(buf),(int)(len),0)
#define read(fd,buf,len) recv((fd),(buf),(int)(len),0)
#endif

#define pipe(fds) _pipe(fds, 4096, _O_BINARY) 
#endif /* _UNISTD_H */